package com.xnyzc.lhy.resource.util;

import org.apache.commons.codec.binary.Base64;

/**
 * @ClassName: CodeUtils
 * @Description: TODO
 * @author user
 * @date 2019-02-28
 * @since OpenJDK 1.8
 */

public class CodeUtils {
	public static String getBasicAuthorization(String username, String password) {
        String encodeKey = username + ":" + password;
        return "Basic" + " " + String.valueOf(Base64.encodeBase64String(encodeKey.getBytes()));
    }
	
}
